package CSnab::Router;

use strict;

use constant ROUTES => [
    {# site
        regexp       => '/',
        set_params   => {uid => 'index'},
        handler      => 'index',
        controller   => 'site_index'
    },
    {
        regexp       => '/catalog/',
        set_params   => {uid => 'catalog'},
        handler      => 'catalog',
        controller   => 'site_index'
    },
    {
        regexp       => qr{/razdel-(\d+)\.html},
        set_params   => {uid => 'catalog'},
        params       => [ qw(id) ], 
        handler      => 'razdel',
        controller   => 'site_index'
    },
    {
        regexp       => '/contacts/',
        set_params   => {uid => 'contacts'},
        handler      => 'contacts',
        controller   => 'site_index'
    },
];

use constant CONTROLLERS => {
    site_index => 'CSnab::Controller::Index',
};

1;
